﻿<%@ Page Language="C#" MasterPageFile="~/WebManager/manager.Master" AutoEventWireup="true"
    CodeBehind="List.aspx.cs" Inherits="WebManager.Manager.RelateCol.List" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <script src="../../../Js/jquery/jquery-1.3.1.min.js" language="javascript" type="text/javascript"></script>

    <script src="../../../Js/jquery/plugins/jquery.checkboxes.pack.js" language="javascript"
        type="text/javascript"></script>

    <script language="javascript" type="text/javascript">
    $(document).ready(function(){
      $("#selectAll").click(function(){      
        $("#ctl00_ContentPlaceHolder1_GridView1").toggleCheckboxes(); 
      });
     
      $("#unselectAll").click(function(){      
        $("#ctl00_ContentPlaceHolder1_GridView1").unCheckCheckboxes(); 
      });
    });
    </script>

    <div style="float: left">
        <div style="float: left; width: 350px">
            <asp:Label ID="Msg" runat="server" Visible="true"></asp:Label></div>
        <div style="float: right">
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            ;<asp:Button ID="SetDefault" runat="server"
                Text="首页设置" onclick="SetDefault_Click" />&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:Button ID="Doc" runat="server"
                Text="新建" OnClick="Doc_Click" />&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:Button ID="Edit" runat="server" Text="编辑" OnClick="Edit_Click" />&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:Button ID="Delete" runat="server" Text="删除" OnClick="Delete_Click" />&nbsp;&nbsp;&nbsp;&nbsp;
        </div>
    </div>
    <br />
    <div>
        <asp:DropDownList ID="Region" runat="server" DataTextField="GName" DataValueField="GName"
            AutoPostBack="True" OnSelectedIndexChanged="Region_SelectedIndexChanged">
        </asp:DropDownList>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:DropDownList ID="SelPage" runat="server" AutoPostBack="True" OnSelectedIndexChanged="Region_SelectedIndexChanged">
            <asp:ListItem Value="(1=1)">所有</asp:ListItem>
            <asp:ListItem Value="(Page='col.aspx')">col.aspx</asp:ListItem>
            <asp:ListItem Value="(Page='c.aspx')">c.aspx</asp:ListItem>
        </asp:DropDownList>
    </div>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" BorderStyle="None"
        BorderWidth="1px" BorderColor="#CCCCCC" BackColor="White" CellPadding="3" Width="100%"
        PageSize="12" AllowPaging="true" OnPageIndexChanging="GridView1_PageIndexChanging">
        <HeaderStyle Font-Size="9pt" Font-Names="宋体" Font-Bold="True" ForeColor="Black" BackColor="SkyBlue">
        </HeaderStyle>
        <SelectedRowStyle Font-Bold="True" ForeColor="White" BackColor="#669999"></SelectedRowStyle>
        <RowStyle ForeColor="Black" BackColor="White"></RowStyle>
        <Columns>
            <asp:BoundField DataField="SID" HeaderText="序号" ReadOnly="True" />
            <asp:BoundField DataField="Page" HeaderText="页面" ReadOnly="True" />
            <asp:BoundField DataField="OName" HeaderText="主栏目" ReadOnly="True" />
            <asp:BoundField DataField="Region" HeaderText="区域" ReadOnly="True" />
            <asp:TemplateField HeaderText="选择">
                <ItemTemplate>
                    <input type="checkbox" id="selectCB" name="selectCB" value="<%# DataBinder.Eval(Container.DataItem,"Page")%>;<%# DataBinder.Eval(Container.DataItem,"PriColumnID")%>;<%# DataBinder.Eval(Container.DataItem,"Region")%>">
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <AlternatingRowStyle BackColor="#E0E0E0" BorderColor="DarkGray" BorderStyle="Dashed"
            BorderWidth="1px" />
    </asp:GridView>
    <div style="float: right; margin-right: 10px">
        <a id="selectAll" href="#">全选</a> &nbsp; &nbsp; &nbsp;<a id="unselectAll" href="#">取消全选</a>
    </div>
</asp:Content>
